use "shp99_h_user", clear
rename *99 * 
rename i99* * 
keep canton idhous eqon h99h29 region
rename h99* *
qui gen year = 1999
save "temp_shp99_h_user.dta", replace


foreach w in 00 01 02  03 04 05 06 07 08 09  {   
use "shp`w'_h_user"
rename *`w' *
rename i`w'* * 
keep canton idhous eqon h`w'h29 region
rename h`w'* *
qui gen year = `w'
qui replace year = 2000 + `w'
save "temp_shp`w'_h_user.dta", replace
}


*10
clear
use "shp10_h_user.dta"
rename *10 *
rename i10* * 
keep canton idhous eqon h10h29 region
rename h10* *
qui gen year = 2010
save "temp_shp10_h_user.dta", replace

foreach w in 11 12 13 14  {   
use "shp`w'_h_user"
rename *`w' *
rename i`w'* * 
keep canton idhous eqon h`w'h29 region
rename h`w'* *
qui gen year = `w'
qui replace year = 2000 + `w'
save "temp_shp`w'_h_user.dta", replace
}


